package com.freight.user.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.freight.core.common.utils.NameUtil;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.annotations.ColumnTransformer;
import org.springframework.format.annotation.DateTimeFormat;

import javax.persistence.Column;
import javax.validation.constraints.Pattern;
import java.util.Date;

@Data
public class PcJoinDriverVo {


    @ApiModelProperty(value = "认证状态 0未认证 1已认证 2审核中 3已过期 ")
    private Integer driverUserStatus;

    @ApiModelProperty(value = "司机id")
    private Long driverId;

    @ApiModelProperty(value = "司机名")
    private String driverName;

    @ApiModelProperty(value = "司机电话")
    private String driverPhone;

    @ApiModelProperty(value = "已接单个数")
    private Integer receivedOrder = 0;

    @ApiModelProperty(value = "车牌号码")
    private String vehicleNum;

    @ApiModelProperty(value = "车牌id")
    private Long vehicleId;

    @ApiModelProperty(value = "驾驶证准驾车型")
    private String driverType;

    @ApiModelProperty(value = "作业状态")
    private String taskState;



    @ApiModelProperty(value = "状态 默认0正常 -1拉黑")
    private Integer status;

    @ApiModelProperty(value = "登录名")
    private String username;

    @ApiModelProperty(value = "身份证号")
    @ColumnTransformer(read = "AES_DECRYPT(UNHEX(num),'freight')", write = "HEX(AES_ENCRYPT(?, 'freight'))")
    private String num;

    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @ApiModelProperty(value = "身份证结束日期")
    private Date endDate;

}
